package com.szxy.miaosha.conf;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @Author: zwz
 * @Date:2020/9/7 22:36
 * @Description:com.szxy.miaosha.conf
 * @Version:1.0
 **/
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    private MiaoShaUserArgumentResolver miaoShaUserArgumentResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(miaoShaUserArgumentResolver);
    }
}
